#ifndef HTTPCLIENT_H
#define HTTPCLIENT_H

#include <QCoreApplication>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QUrl>
#include <QJsonDocument>
#include <QJsonObject>
#include <QCoreApplication>
#include <QJsonArray>


class HttpClient : public QObject
{
    Q_OBJECT
public:
    explicit HttpClient(QObject *parent = nullptr);

    void PostAysnc(const QString& url,const QJsonObject& json);

signals:
    void responseReceived(const QByteArray &data);
    void errorOccurred(const QString &error);

private slots:
    void HandleResponse(QNetworkReply* reply);

private:
    QNetworkAccessManager* manager;
};

#endif // HTTPCLIENT_H
